<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <link href="/static/css/css.css" rel="stylesheet" type="text/css"/>
    <link href="/static/css/common.css" rel="stylesheet" type="text/css"/>
    <link href="/static/css/Orders.css" rel="stylesheet" type="text/css"/>
    <script src="/static/js/jquery-1.9.1.min.js" type="text/javascript"></script>
    <script src="/static/js/jquery.reveal.js" type="text/javascript"></script>
    <script src="/static/js/jquery.SuperSlide.2.1.1.js" type="text/javascript"></script>
    <script src="/static/js/jquery.sumoselect.min.js" type="text/javascript"></script>
    <script src="/static/js/common_js.js" type="text/javascript"></script>
    <script src="/static/js/footer.js" type="text/javascript"></script>
    <script src="/static/js/order.js" type="text/javascript"></script>
    <title>确认订单界面</title>
</head>
<script type="text/javascript">
    $(document).ready(function () {
        window.asd = $('.SlectBox').SumoSelect({csvDispCount: 3});
        window.test = $('.testsel').SumoSelect({okCancelInMulti: true});
    });
</script>
<body>
<div id="Orders" class="Inside_pages  clearfix">
    <div class="Orders_style clearfix">
        <div class="address clearfix">
            <div class="title">收货人信息</div>
            <div class="adderss_list clearfix">
                <div class="title_name">选择收货地址 <a href="/user/address">+添加地址</a></div>
                <div class="list" id="select">
                    {% for shop_address in shop_address_list %}
                        {#                        class="confirm active"#}
                        <ul onclick="select_addr(this);">
                            {#                            <div class="default">默认地址</div>#}
                            {#                            <div class="adderss_operating">#}
                            {#                                <div class="Operate">#}
                            {#                                    <a href="#" class="delete_btn"></a>#}
                            {#                                </div>#}
                            {#                            </div>#}
                            <div class="user_address">
                                <li>{{ shop_address.name }}</li>
                                <li>{{ shop_address.like_address + shop_address.address }}</li>
                                <li>{{ shop_address.phone }}</li>
                            </div>
                        </ul>
                    {% endfor %}
                </div>
            </div>
            <!--收货地址样式-->
            <div class="Shipping_address">
                <ul class="detailed">
                    <li><label>收货人姓名</label><span id="shou_name"></span></li>
                    <li><label>电子邮件</label><span>{{ user.email }}</span></li>
                    <li><label>详细地址</label><span id="shou_address"></span></li>
                    <li><label>手机号码</label><span id="shou_phone"></span></li>
                </ul>
            </div>
        </div>

        <form class="form" method="post">
            <fieldset>
                <!--快递选择-->
                <div class="express_delivery">
                    <div class="title_name">选择快递方式</div>

                    <ul class="dowebok">
                        <li><input type="radio" name="radio" data-labelauty="圆通快递" express-type="圆通快递"></li>
                        <li><input type="radio" name="radio" data-labelauty="中通快递" express-type="中通快递"></li>
                        <li><input type="radio" name="radio" data-labelauty="申通快递" express-type="申通快递"></li>
                        <li><input type="radio" name="radio" data-labelauty="百世快递" express-type="百世快递"></li>
                        <li><input type="radio" name="radio" data-labelauty="韵达快递" express-type="韵达快递"></li>
                        <li><input type="radio" name="radio" data-labelauty="顺丰快递" express-type="顺丰快递"></li>

                    </ul>

                </div>

                <!--付款方式-->
                <div class="payment">
                    <div class="title_name">支付方式</div>
                    <ul>
                        <li><input type="radio" name="pay" pay_type="余额支付" data-labelauty="余额支付"></li>
                        <li><input type="radio" name="pay" pay_type="支付宝" data-labelauty="支付宝"></li>
                        <li><input type="radio" name="pay" pay_type="微信支付" data-labelauty="微信支付"></li>
                        <li><input type="radio" name="pay" pay_type="货到付款" data-labelauty="货到付款"></li>
                    </ul>
                </div>
                <!--发票样式-->

                <!--产品列表-->
                <div class="Product_List">
                    <table>
                        <thead>
                        <tr class="title">
                            <td class="name">商品名称</td>
                            <td class="price">商品价格</td>
                            {#                                <td class="Preferential">优惠价</td>#}
                            <td class="Quantity">购买数量</td>
                            <td class="Money">金额</td>
                        </tr>
                        </thead>
                        <tbody>
                        {% for shop_car in shop_car_list %}
                            <tr>
                                <td class="Product_info">
                                    <a href="#"><img src="/static/product_img/{{ shop_car.product_avatar }}"
                                                     width="100px"
                                                     height="100px"/></a>
                                    <a href="#" class="product_name">{{ shop_car.product_name }}</a>
                                </td>
                                <td><i>￥</i>{{ shop_car.price }}</td>
                                {#                                    <td><i>￥</i>{{ (shop_car.price|float - 5)|round(precision = 2) }}</td>#}
                                <td id="product_count">{{ shop_car.count }}</td>
                                <td class="Moneys">
                                    <i>￥</i>{{ (shop_car.price|float * shop_car.count|int)|round(precision = 2) }}
                                </td>
                            </tr>
                        {% endfor %}


                        </tbody>
                    </table>
                    <div class="Pay_info">
                        <label>订单留言</label><input id="comment" type="text" onkeyup="checkLength(this);"
                                                  class="text_name "/> <span class="wordage">剩余字数：<span id="sy"
                                                                                                        style="color:Red;">50</span></span>
                    </div>
                    <!--价格-->
                    <div class="price_style">
                        <div class="right_direction">
                            <ul>
                                <li><label>商品总价</label><i>￥</i><span>{{ price_all }}</span></li>
                                <li><label>优惠金额</label><i>￥</i><span>-0.00</span></li>
                                {#                                    <li><label>配&nbsp;&nbsp;送&nbsp;&nbsp;费</label><i>￥</i><span>0.00</span></li>#}
                                <li class="shiji_price">
                                    <label>实&nbsp;&nbsp;付&nbsp;&nbsp;款</label><i>￥</i><span id="shifu">{{ price_all }}</span>
                                </li>
                            </ul>
                            <div class="btn"><input name="submit" is_car="{{ is_car }}" type="button" value="提交订单" class="submit_btn"
                                                    onclick="create_order(this);"/>
                                <input name="" type="button" value="返回购物车" class="return_btn"
                                       onclick="return_shop_car();"/></div>
                            <div class="integral right">待订单确认后，你将获得<span>{{ price_all|int }}</span>积分</div>
                        </div>
                    </div>
                </div>
            </fieldset>
        </form>
    </div>
</div>
<script type="text/javascript">
    function checkLength(which) {
        var maxChars = 50; //
        if (which.value.length > maxChars) {
            alert("您出入的字数超多限制!");
            // 超过限制的字数了就将 文本框中的内容按规定的字数 截取
            which.value = which.value.substring(0, maxChars);
            return false;
        } else {
            var curr = maxChars - which.value.length; //250 减去 当前输入的
            document.getElementById("sy").innerHTML = curr.toString();
            return true;
        }
    }
</script>
<script>
    $(function () {
        $(':input').labelauty();
    });
</script>
</body>
</html>
